import { LogoutIcon } from 'tdesign-icons-vue-next';
import { shallowRef } from 'vue';

import Layout from '@/layouts/index.vue';

export default [
  {
    path: '/user',
    name: 'user',
    component: Layout,
    redirect: '/user/index',
    meta: { title: { zh_CN: '个人中心', en_US: 'User Center' }, icon: 'user-circle', keepAlive: true },
    children: [
      {
        path: 'index',
        name: 'UserIndex',
        component: () => import('@/pages/user/index.vue'),
        meta: { title: { zh_CN: '个人中心', en_US: 'User Center' }, keepAlive: true },
      },
    ],
  },
  {
    path: '/employee',
    name: 'employee',
    component: Layout,
    redirect: '/employee/index',
    meta: { title: { zh_CN: '人员管理', en_US: 'Employee Management' }, icon: 'user-circle', keepAlive: true },
    children: [
      {
        path: 'index',
        name: 'EmployeeIndex',
        component: () => import('@/pages/employee/index.vue'),
        meta: { title: { zh_CN: '人员管理', en_US: 'Employee Management' }, keepAlive: true },
      },
      {
        path: 'edit/:id',
        name: 'EmployeeEdit',
        component: () => import('@/pages/employee/EmployeeEdit.vue'),
        meta: {
          title: { zh_CN: '编辑员工', en_US: 'Edit Employee' },
          hidden: true, // 不在菜单显示
        },
      },
    ],
  },
  {
    path: '/loginRedirect',
    name: 'loginRedirect',
    redirect: '/login',
    meta: { title: { zh_CN: '登录页', en_US: 'Login' }, icon: shallowRef(LogoutIcon) },
    component: () => import('@/layouts/blank.vue'),
    children: [
      {
        path: 'index',
        redirect: '/login',
        component: () => import('@/layouts/blank.vue'),
        meta: { title: { zh_CN: '登录页', en_US: 'Login' } },
      },
    ],
  },
];
